// basicnpc.txt
// A very simple, naive text. Creature attacks anything it hates nearby.
// Once it has won, it returns to its home.
// NPC that doesn't move or do anything
//   Cell 1,2 - Stuff done flag. If both 0, nothing. Otherwise when this is killed, set to 1.

begincreaturescript;

variables;

short i,target;
short att_change = 0;

body;

beginstate INIT_STATE;
	set_name(ME,"Travald's Ghost");
	set_level(ME,25);
	change_max_health(ME,100);
	set_boss_level(ME,2);
	set_resistance(ME,1,100);
	set_resistance(ME,2,100);

	break;

beginstate DEAD_STATE;
	set_flag(55,9,1);
	award_party_xp(200,20);
	begin_talk_mode(13);
break;

beginstate START_STATE; 
	if ((att_change == 0) && (get_attitude(ME) >= 10) && (num_chars_in_group(2) > 0)) {
		print_str("Suddenly, all of Travald's shades swoop to aid their master.");
		att_change = 1;
		set_attitude(1002,10);
		}
break;

beginstate TALKING_STATE;
	print_str("Talking: Travald's shade doesn't respond. It is too faint.");
break;